package com.beamfield.dao.mixstation;

import com.beamfield.model.MixCar;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface MixCarMapper {

    int deleteByPrimaryKey(Long id);

    int insert(MixCar record);

    int insertSelective(MixCar record);

    MixCar selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(MixCar record);

    int updateByPrimaryKey(MixCar record);

    List<MixCar> getCarList(@Param("offset") Integer offset, @Param("limit") Integer limit,
                            @Param("plate_number") String plateNumber, @Param("leasing_company") String leasingCompany, @Param("beam_id") Long beamId);

    int getCount(@Param("plate_number") String plateNumber, @Param("leasing_company") String leasingCompany, @Param("beam_id") Long beamId);

    MixCar selectByCarNo(@Param("car_no")String carNo,@Param("beam_id") Long beamId);

    String getGpsNo(@Param("plate_number")String plateNumber);

    MixCar getPosition(@Param("gps_no")String gpsNo);
}